// 空海运接口
import request from '@/utils/request'

export function selectAirOrderInfo(params) {
  return request({
    url: 'order/airOrderInfo/selectAirOrderInfo',
    method: 'get',
    params,
  })
}

export function airOrderInfo(id) {
  return request({
    url: `order/airOrderInfo/airOrderDetail/${ id }`,
    method: 'get',
   
  })
}
// 配餐

export function distribution(data) {
  return request({
    url: 'order/airOrderInfo/distribution_depot',
    method: 'post',
    data,
  })
}
export function selectSysAirCabinetById(id) {
  return request({
    url: `order/airOrderInfo/selectSysAirCabinetById/${ id }`,
    method: 'post',
   
  })
}
export function cabinAllocation(data) {
  return request({
    url: 'order/airOrderInfo/cabinAllocation',
    method: 'post',
    data,
  })
}

export function signOut(data) {
  return request({
    url: '/order/airOrderInfo/signOut',
    method: 'post',
    data,
  })
}

export function deletes(id) {
  return request({
    url: `order/airOrderInfo/delete/${ id }`,
    method: 'delete',
  })
}

export function editAirInfo(data) {
  return request({
    url: 'order/airOrderInfo/edit/air_info',
    method: 'post',
    data,
  })
}

// 国内查验

export function domesticInspection(data) {
  return request({
    url: 'order/airOrderInfo/domesticInspection',
    method: 'post',
    data,
  })
}
// 国内已放行
export function domesticDomestically(data) {
  return request({
    url: 'order/airOrderInfo/domesticDomestically',
    method: 'post',
    data,
  })
}

// 国外查验
export function foreignInspection(data) {
  return request({
    url: 'order/airOrderInfo/foreignInspection',
    method: 'post',
    data,
  })
}
//  国内报关
export function domesticDeclaration(data) {
  return request({
    url: 'order/airOrderInfo/domesticDeclaration',
    method: 'post',
    data,
  })
}
// 签出

export function ladingOut(data) {
  return request({
    url: 'order/airOrderInfo/ladingOut',
    method: 'post',
    data,
  })
}
// 国外清关
// export function airOrderInfo(data) {
//   return request({
//     url: 'order/airOrderInfo/airOrderInfo',
//     method: 'post',
//     data,
//   })
// }
// 国外清关已放行
export function editOrderStatus(data) {
  return request({
    url: 'order/airOrderInfo/customsClearancePermit',
    method: 'post',
    data,
  })
}
// 国外清关
export function customsClearance(data) {
  return request({
    url: 'order/airOrderInfo/customsClearance',
    method: 'post',
    data,
  })
}
// 已到港
export function saveOrderArrivedTrack(data) {
  return request({
    url: 'order/airOrderInfo/saveOrderArrivedTrack',
    method: 'post',
    data,
  })
}
// 已提柜
export function carryCabinet(data) {
  return request({
    url: 'order/airOrderInfo/carryCabinet',
    method: 'post',
    data,
  })
}
// 提重柜
export function submitUps(data) {
  return request({
    url: 'order/airOrderInfo/submitUps',
    method: 'post',
    data,
  })
}
// 还空柜
export function submitOverseas(data) {
  return request({
    url: 'order/airOrderInfo/submitOverseas',
    method: 'post',
    data,
  })
}

// ---------------- 列表操作

// 应收费用详情列表
export function airFinanceReceList(data) {
  return request({
    url: 'finance/airFinanceRece/list',
    method: 'post',
    data,
  })
}

// 删除空海运应收
export function deleteAirReceivableDetailsById(id) {
  return request({
    url: `finance/airFinanceRece/deleteAirReceivableDetailsById/${ id }`,
    method: 'delete',
  })
}

// 修改空运应收费用
export function airFinanceReceAddDetails(data) {
  return request({
    url: 'finance/airFinanceRece/addDetails',
    method: 'post',
    data,
  })
}

// 应付费用详情列表
export function selectSysExpensesPayableList(data) {
  return request({
    url: 'finance/payable/selectSysExpensesPayableList',
    method: 'post',
    data,
  })
}

// 删除空海运应付
export function deleteSysExpensesPayableByIds(ids) {
  return request({
    url: `finance/payable/airAndSeaTransportationRemove/${ ids }`,
    method: 'delete',
  })
}

// 修改应付费用
export function airAndSeaTransportationAdd(data) {
  return request({
    url: 'finance/payable/airAndSeaTransportationAdd',
    method: 'post',
    data,
  })
}

// 文件上传下载

// 文件查询
export function selectFileList(params) {
  return request({
    url: 'order/airOrderInfo/file/query',
    method: 'get',
    params,
  })
}
// 下载

export function aircabinetFile(data) {
  return request({
    url: 'order/airOrderInfo/file/upload',
    method: 'post',
    data,
  })
}
// 删除文件

export function deleteFile(id) {
  return request({
    url: `/order/airOrderInfo/file/del/${ id }`,
    method: 'delete',
    
  })
}